package com.dreem.composite;

/**
 * @program: DesignParrtern
 * @description: 客户端
 * @author: Peng
 * @create: 2021-02-21  09:30
 **/
public class Client {
    public static void main(String[] args){
        OrganizationComponent university = new University("南昌理工学院", "the royal university");
        OrganizationComponent college = new College("计算机信息工程", "computer");
        college.add(new Department("软件工程", "software"));
        college.add(new Department("计算机科学", "computer science"));
        OrganizationComponent college1 = new College("电子信息工程", "electric");
        university.add(college);
        university.add(college1);
        university.print();
    }
}
